#ifndef _ADJACENCY_LIST_H
#define _ADJACENCY_LIST_H

struct adjacency_list_ele;
struct ListNode;
struct HashTbl;

typedef struct adjacency_list_ele ElementType;

typedef unsigned int Index;

typedef struct ListNode *Position;
typedef Position List;
typedef struct Tbl *Table;
typedef Table AdjacencyList;

struct adjacency_list_ele
{
    int To;
    int Weight;
};
struct ListNode
{
    ElementType Element;
    Position Next;
};
struct Tbl
{
    int TableSize;
    List *TheLists;
};
AdjacencyList InitializeAdjacencyList(int Size);
void DestoryTable(AdjacencyList H);
void Insert(Index index, ElementType *X, AdjacencyList H);
void Print(AdjacencyList H);
#endif